package com.justdoit.facedemo.controller;

import com.justdoit.facedemo.mapper.EchartMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/echarts")
public class EchartController {

    @Autowired
    private EchartMapper echartMapper;

    @GetMapping("getEcharts")
    public List getEchart(){

        List<Integer> dataValue2 = new ArrayList<Integer>();

        //查询所有用户
        int o = echartMapper.AllPeople();
        //把当前未审核的人数添加到计划,返回到前端
        dataValue2.add(o);

        //未审核
        int a = echartMapper.weiShengHe();
        //把当前未审核的人数添加到计划,返回到前端
        dataValue2.add(a);

        //审核通过
        int b = echartMapper.ShengHeTongGuo();
        dataValue2.add(b);

       // 已结束
        int c = echartMapper.YiJieShu();
        dataValue2.add(c);

        //已取消
        int d = echartMapper.YiQuXiao();
        dataValue2.add(d);

        //已签到
        int e = echartMapper.YiQianDao();
        dataValue2.add(e);

        //未签到
        int f = echartMapper.WeiQianDao();
        dataValue2.add(f);

        //补签
        int g = echartMapper.BuQian();
        dataValue2.add(g);

        //人脸签到
        int h = echartMapper.RenLianQianDao();
        dataValue2.add(h);

        //图片签到
        int i = echartMapper.TuPianQianDao();
        dataValue2.add(i);

        return dataValue2;
    }

}
